/**
 * Created by Administrator on 2017/8/4.
 */


import React from 'react'
import {FlatList,TouchableOpacity,View, Text,Dimensions,StyleSheet} from 'react-native'

const ScreenSize = {
    width: Dimensions.get('window').width,
    height: Dimensions.get('window').height
};
const styles = StyleSheet.create({
    ll:{
        width:ScreenSize.width,
        height:85,
        justifyContent:'center',
        backgroundColor:'#fff'
    },
    contentLl:{
        width:ScreenSize.width,
        height:55,
        justifyContent:'space-between'
    },
    itemLl:{
        width:ScreenSize.width,
        flexDirection:'row',
        justifyContent:'space-between'
    },
    tv1:{
        fontSize:14,
        color:'#FC3B38',
        marginLeft:27
    },
    tv2:{
        fontSize:14,
        color:'#999999',
        marginRight:12
    },
    tv3:{
        fontSize:16,
        color:'#333333',
        marginLeft:27
    }

})
export default class ReplenishmentNotify extends React.Component{

    constructor(props){
        super(props)
        this.state = {
            listData:[{},{},{},{}]
        }
    }


    render(){
        return(
            <FlatList
                data={this.state.listData}
                ItemSeparatorComponent={()=>this._renderDivider()}
                renderItem={({item}) =>this._renderItem(item)}/>
        )
    }

    _renderDivider(){
        return(
            <View style={{backgroundColor:'#cfcfcf',height:0.5}}></View>
        )
    }

    _renderItem(item){
        return(
            <TouchableOpacity style={styles.ll}
                              onPress={()=>this.props.navigation.navigate('ReplenishmentDetails')}>
                <View style={styles.contentLl}>
                    <View style={[styles.itemLl]}>
                        <Text style={styles.tv1}>有货品待补</Text>
                        <Text style={styles.tv2}>2017-07-05 15:35:26</Text>
                    </View>
                    <View style={[styles.itemLl]}>
                        <Text style={styles.tv3}>柜号：14100</Text>
                        <Text style={styles.tv2}>地址：金牛区万达广场2楼</Text>
                    </View>
                </View>
            </TouchableOpacity>
        )
    }
}